﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.IO;
using DivaScript;

namespace ft_module_parser.ToolsExperiment
{
    class DSCtest
    {
        public static void DumpPVScript(string[] args)
        {
            foreach (var i in Directory.EnumerateFiles(@"P:\ACFT\rom\script", "*.dsc"))
            {
                var scene = PvScript.ParseBinaryScripts(new string[] { i }, Format.FT, false);
                foreach (var c in scene)
                {
                    switch (c.Opcode)
                    {
                        case "TONE_TRANS":
                        case "BLOOM":
                        case "LIGHT_ROT":
                        case "EFFECT":
                            Console.Write(Path.GetFileNameWithoutExtension(i) + ",");
                            Console.Write(c.Opcode);
                            foreach (var d in c.Parameters)
                            {
                                Console.Write("," + d);
                            }
                            Console.Write("\n");
                            break;

                        default:
                            break;
                    }
                }
            }
        }

        public static void pvflstopwatch(string[] args)
        {
            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();

            bool isDone = false;


        }

    }
}
